<?php
header('Content-type: '.$content_type);
if(!isset($inpage)) header('Content-Disposition: attachment; filename="'.$filename.'.xml"');
echo $content_for_layout;
die();
?>